package model

type Dept struct {
	DeptId    int64  `gorm:"column:dept_id;primaryKey;autoIncrement;" json:"deptId"`
	ParentId  int64  `gorm:"column:parent_id;" json:"parentId"`
	Children  []Dept `gorm:"foreignKey:dept_id;" json:"children"`
	Ancestors string `gorm:"column:ancestors;" json:"ancestors"`
	DeptName  string `gorm:"column:dept_name;" json:"deptName"`
	OrderNum  int    `gorm:"column:order_num;" json:"orderNum"`
	Leader    string `gorm:"column:leader;" json:"leader"`
	Phone     string `gorm:"column:phone;" json:"phone"`
	Email     string `gorm:"column:email;" json:"email"`
	Common    `gorm:"embedded"`
}

func (Dept) TableName() string {
	return "sys_dept"
}
